package com.gientech.orderseataexercise.service.impl;

import com.gientech.orderseataexercise.dao.OrderSeataDao;
import com.gientech.orderseataexercise.model.Order;
import com.gientech.orderseataexercise.service.OrderSeataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 信息业务处理
 */
@Service
public class OrderSeataServiceImpl implements OrderSeataService {

    @Autowired
    private OrderSeataDao orderSeataDao;

    /**
     * 根据实体类插入数据
     * @param order 实体类
     */
    @Override
    public Integer insertOrderInfo(Order order) {
        return orderSeataDao.insertOrderInfo(order);
    }

    /**
     * 根据实体类更新数据
     * @param order 实体类
     */
    @Override
    public Integer updateOrderInfo(Order order) {
        return orderSeataDao.updateOrderInfo(order);
    }

    /**
     * 根据实体类获取数据
     * @param order 实体类
     * @return
     */
    @Override
    public List<Order> selectOrderInfoList(Order order) {
        return orderSeataDao.selectOrderInfoList(order);
    }
}
